import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({ 
  // mode: 'history',
  routes: [
    {
      path: '/login',
      component: resolve => require(['@/views/login/Logining.vue'], resolve),
      children: [{
              path: '', // 登录页面
              component: resolve => require(['@/views/login/Login.vue'], resolve) 
          }
      ]
    },
    {
      path: '',
      component: resolve => require(['@/components/home/home.vue'], resolve),
      children:[
        {
            path: '',
            redirect: 'login'
        },
        {
          path: '/index', // 首页
          name: 'index',
          component: resolve => require(['@/views/index/index1.vue'], resolve)
        },{
          path: '/serverOrder', // 服务订单
          name: 'serverOrder',
          component: resolve => require(['@/views/serverOrder/serverOrder.vue'], resolve),
        },{
          path: '/orderAllocation', // 订单统一分配
          name: 'orderAllocation',
          component: resolve => require(['@/views/orderAllocation/orderAllocation.vue'], resolve)
        },{
          path: '/butlerScheduling', // 管家排期  
          name: 'butlerScheduling',
          component: resolve => require(['@/views/butlerScheduling/butlerScheduling.vue'], resolve)
        },{
          path: '/orderCount', // 订单统计  
          name: 'orderCount',
          component: resolve => require(['@/views/orderCount/orderCount.vue'], resolve)
        },{
          path: '/reportList', // 报告列表 
          name: 'reportList',
          component: resolve => require(['@/views/reportCenter/reportList.vue'], resolve)
        },{
          path: '/reportData', // 报告数据
          name: 'reportData',
          component: resolve => require(['@/views/reportCenter/reportData.vue'], resolve)
        },{
          path: '/operate', // 运营
          name: 'operate',
          component: resolve => require(['@/views/operate/operate.vue'], resolve)
        },{
          path: '/finance', // 财务
          name: 'finance',
          component: resolve => require(['@/views/finance/finance.vue'], resolve)
        },{
          path: '/personnel', // 员工列表
          name: 'personnel',
          component: resolve => require(['@/views/personnel/personnel.vue'], resolve)
        },{
          path: '/cityArea', // 城市商圈
          name: 'cityArea',
          component: resolve => require(['@/views/cityArea/cityArea.vue'], resolve) 
        },{
          path: '/jobManagement', // 职位管理  
          name: 'jobManagement',
          component: resolve => require(['@/views/jobManagement/jobManagement.vue'], resolve)
        },{
          path: '/urbanArea', // 城市区域  
          name: 'urbanArea',
          component: resolve => require(['@/views/urbanArea/urbanArea.vue'], resolve)
        },{
          path: '/propertyBank', // 楼盘库
          name: 'propertyBank',
          component: resolve => require(['@/views/propertyBank/propertyBank.vue'], resolve),
          meta: { keepAlive: true ,isBack:false}
        },{
          path: '/roomNumber', // 房号列表
          name: 'roomNumber',
          component: resolve => require(['@/views/propertyBank/roomNumber/roomNumber.vue'], resolve),
          meta: { keepAlive: true ,isBack:false}
        },{
          path: '/reportTemplate', // 报告模板
          name: 'reportTemplate',
          component: resolve => require(['@/views/reportTemplate/reportTemplate.vue'], resolve)
        },{
          path: '/setServerTime', // 设置服务时间 
          name: 'setServerTime',
          component: resolve => require(['@/views/setServerTime/setServerTime.vue'], resolve)
        },{
          path: '/systemParameter', // 系统参数
          name: 'systemParameter',
          component: resolve => require(['@/views/systemParameter/systemParameter.vue'], resolve)
        }
      ]
    }
  ]
})
